Controller for determining modification method of position or orientation of robot

ABSTRACT

A controller calculates a correction amount of a position of a robot 1 at a movement point in a first movement path, and drives the robot 1 in a second movement path obtained by correcting the first movement path. The controller includes a second camera configured to detect a shape of a part after a robot apparatus performs a task, and a variable calculating unit configured to calculate, based on an output of the second camera, a quality variable representing quality of a workpiece. When the quality variable deviates from a predetermined determination range, a determination unit of the controller determines that the position or an orientation of the robot 1 needs to be modified based on a correlation between the correction amount of the position in the first movement path and the quality variable.

RELATED APPLICATIONS

The present application claims priority of Japanese Application Number2019-202603 filed Nov. 7, 2019, the disclosure of which is herebyincorporated by reference herein in its entirety.

BACKGROUND OF THE INVENTION 1. Field of the Invention

The present invention relates to a controller for determining amodification method of a position or an orientation of a robot.

2. Description of the Related Art

A robot apparatus includes a robot, an operation tool attached to therobot, and a controller for controlling the robot. The controller drivesthe robot and the operation tool based on an operation program. Anoperator can teach teaching points in advance in order to determine aposition and an orientation of the robot. The operation program iscreated based on positions of the teaching points and orientations ofthe robot at the teaching points. When driving the robot, the controllercan set an interpolation point between the teaching points based on theteaching points. The controller controls the robot so as to be at thepositions and in the orientations that are defined at the teachingpoints and the interpolation points.

In the related art, a control for detecting a position of a workpiece bya camera and correcting a position and an orientation of a robotaccording to the position of the actual workpiece during a period oftime in which the robot apparatus is performing a task has been known(e.g., Japanese Unexamined Patent Publication No. 9-72717A).Alternatively, a control for correcting a movement path based on animage or the like of an actual workpiece when an operation program iscreated in an off-line state has been known. (e.g., Japanese UnexaminedPatent Publication No. 2004-255547A and Japanese Unexamined PatentPublication No. 2016-140958A). In addition, it has been known to attacha sensor to a robot and perform inspection of a workpiece for which atask is performed (e.g., Japanese Unexamined Patent Publication No.7-98217A).

SUMMARY OF THE INVENTION

A workpiece for which a task is to be performed by a robot apparatus isfixed to a platform or the like. The robot apparatus performs a taskwhile changing a position and an orientation relatively with respect toa part of a workpiece where the task is to be performed. However, theposition of the part of the workpiece where the task is to be performedon the platform may be shifted, and thus, the position of the workpiecewith respect to a robot may be shifted. For example, a jig for fixing aworkpiece to the platform may slightly deform due to aging degradation,or a screw may be loosened. Alternatively, a component made of rubberand included in the jig may degrade or the jig may be abraded. As aresult, the position of the workpiece on the platform may be fixed in astate shifted from a desired position.

Alternatively, when the robot apparatus performs welding, spattergenerated when the welding is performed may adhere to a surface of theplatform. A slight gap may be generated between the platform and theworkpiece by the spatter. As a result, the position of the workpiece onthe platform may be slightly shifted. Alternatively, in a case where theworkpiece is thin, the workpiece may deform due to heat when the weldingis performed.

In addition, dimensions of workpieces may be slightly different for eachgroup of components manufactured in a plurality of factories. That is,when a lot of the workpiece is changed, the dimensions of the workpiecemay change slightly. Alternatively, due to a manufacturing error of eachworkpiece, the position of the part of the workpiece where the task isperformed may be shifted from the desired position.

When the position at which the robot apparatus performs the task isshifted from the desired position, there is a problem that the qualityof the workpiece deteriorates. Therefore, the operator can modify theposition of the teaching point and the orientation at the teachingpoint. However, there are a variety of production methods formanufacturing products. In addition, since many types of components areused, it is difficult for the operator to determine the position or theorientation of the robot that adversely affects the quality of theworkpiece. The operator needs experience in order to modify the positionor the orientation of the robot.

In the related art, a technique has been known that uses a sensorattached to a robot and corrects a movement path of the robot. However,although the position of the robot can be corrected, there is a problemthat the orientation of the robot cannot be corrected. In particular, inarc welding or in applying adhesive, the orientation of the robot (anorientation of an operation tool) with respect to a workpiece greatlyaffects the quality of the workpiece. For this reason, there is aproblem that when the quality of the workpiece is low, it is difficultfor the operator to determine whether the position of the robot shouldbe modified or the orientation of the robot should be modified.

Furthermore, a task in which the operator modifies the position or theorientation of the robot is time consuming, and there is a problem thatthe robot apparatus cannot perform a task during a period of time inwhich the position or the orientation of the robot is modified.

One aspect of the present disclosure is a controller of a robotapparatus including a robot and an operation tool. The controllerincludes a correction amount calculating unit configured to calculate acorrection amount of a position of the robot at a movement point of afirst movement path determined in advance. The controller includes anoperation control unit configured to drive the robot in a secondmovement path obtained by correcting the first movement path based onthe correction amount calculated by the correction amount calculatingunit. The controller includes a shape detecting sensor configured todetect a shape of a part after the robot apparatus performs a task, anda variable calculating unit configured to calculate a quality variablerepresenting quality of a workpiece based on the shape detected by anoutput of the shape detecting sensor. The controller includes adetermination unit configured to determine a modification method of theposition or an orientation of the robot. The determination unitdetermines that the position or the orientation of the robot needs to bemodified based on a correlation between the correction amount of theposition of the first movement path and the quality variable when thequality variable deviates from a predetermined determination range.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a schematic view of a first robot apparatus according to anembodiment.

FIG. 2 is a front view of a robot and an operation tool of the firstrobot apparatus.

FIG. 3 is a block diagram of the first robot apparatus.

FIG. 4 is an enlarged perspective view of workpieces and a welding torchwhen arc welding is performed by the first robot apparatus.

FIG. 5 is a diagram illustrating a movement path before correction and amovement path after correction of the robot.

FIG. 6 is a flowchart of a control for performing welding by the firstrobot apparatus.

FIG. 7 is a flowchart of a control for acquiring parameters related to ashape of the workpiece after the welding.

FIG. 8 is a schematic cross-sectional view of workpieces for describingparameters for inspecting quality of the workpieces.

FIG. 9 is a schematic cross-sectional view of other workpieces fordescribing parameters for inspecting quality of the workpieces.

FIG. 10 is graphs of inspection results of parameters when quality of aworkpiece is inspected.

FIG. 11 is a flowchart of a first control for determining a modificationmethod of a position or an orientation of the robot.

FIG. 12 is a diagram of the movement path after a position of a movementpoint is modified based on a determination result by a determinationunit.

FIG. 13 is a schematic view of workpieces and a welding torch fordescribing a control for calculating a path after correction beforewelding is performed.

FIG. 14 is a schematic view of workpieces and the welding torch fordescribing a control for calculating a path after correction during aperiod of time in which the welding is being performed.

FIG. 15 is a graph of a current flowing through a wire when arc weldingis performed while weaving is performed.

FIG. 16 is a diagram of a movement path before correction and themovement path after correction of a comparative example.

FIG. 17 is a diagram for describing a control for calculating amodification amount of an orientation of the robot.

FIG. 18 is a diagram for describing another control for calculating amodification amount of an orientation of the robot.

FIG. 19 is a diagram of a movement path for describing a control forcalculating a modification amount of a position of the robot.

FIG. 20 is a diagram of an auxiliary coordinate system set at a movementpoint having the best score.

FIG. 21 is a diagram of an auxiliary coordinate system set at a movementpoint whose position is modified.

FIG. 22 is a block diagram of a second robot apparatus according to theembodiment.

DETAILED DESCRIPTION

A controller of a robot according to the embodiment will be describedwith reference to FIG. 1 to FIG. 22 . In the present embodiment, a robotapparatus for fixing workpieces by arc welding is exemplified anddescribed.

FIG. 1 is a schematic view of a first robot apparatus according to thepresent embodiment. FIG. 2 is a front view of a robot and a weldingtorch according to the present embodiment. FIG. 3 is a block diagram ofthe first robot apparatus according to the present embodiment. Withreference to FIG. 1 to FIG. 3 , a first robot apparatus 8 includes awelding torch 2 as an operation tool, and a robot 1 that moves thewelding torch 2. The robot 1 of the present embodiment is an articulatedrobot having a plurality of joints.

The robot 1 includes a base 14 and a turning base 13 that is supportedby the base 14. The base 14 is fixed on an installation surface. Theturning base 13 rotates relative to the base 14. The robot 1 includes anupper arm 11 and a lower arm 12. The lower arm 12 is supported by theturning base 13 via the joint. The upper arm 11 is supported by thelower arm 12 via the joint. The robot 1 includes a wrist 15 that iscoupled to an end portion of the upper arm 11. The wrist 15 is supportedby the upper arm 11 via the joint. The welding torch 2 is fixed to aflange 16 of the wrist 15.

The robot 1 of the present embodiment includes six drive axes. The robot1 includes a robot drive device that drives constituent members of therobot 1 such as the upper arm 11. The robot drive device of the presentembodiment includes a plurality of robot drive motors 22 for driving theupper arm 11, the lower arm 12, the turning base 13, and wrist 15. Sincedirections of the constituent members of the robot 1 change at thejoints, a position and an orientation of the robot 1 change.

The controller 10 of the robot apparatus 8 includes a robot controller 4that controls the robot 1. The robot controller 4 includes an arithmeticprocessing device (computer) including a central processing unit (CPU)as a processor. The arithmetic processing device includes a randomaccess memory (RAM), a read-only memory (ROM), and the like that areconnected to the CPU via a bus. The robot 1 is connected to the robotcontroller 4 via a communication line.

The robot apparatus 8 includes a wire supply device 18 for supplying awire 19 to the welding torch 2. The wire supply device 18 supplies thewire 19 that is consumed accompanied by performing welding to thewelding torch 2. The wire supply device 18 of the present embodiment isfixed to the robot 1.

The controller 10 of the robot apparatus 8 includes a welding controller5 that controls the welding torch 2 and the wire supply device 18. Thewelding controller 5 includes an arithmetic processing device includinga CPU serving as a processor, a RAM connected to the CPU via a bus, andthe like. Additionally, the welding controller 5 includes an electriccircuit that supplies electricity to the welding torch 2 and the wiresupply device 18. The welding controller 5 is connected to the robotcontroller 4. The welding controller 5 is formed so as to be able tomutually communicate with the robot controller 4. The welding controller5 supplies electricity to the welding torch 2 and supplies the wire 19in response to an operation of the robot 1. The welding controller 5 ofthe present embodiment is controlled by the robot controller 4.

The robot controller 4 includes a teach pendant 3 for operating therobot controller 4 by the operator. The teach pendant 3 includes aninput part 3 a for inputting information regarding the robot 1 and thewelding torch 2. The input part 3 a is configured with a member such asa keyboard and a dial. The teach pendant 3 includes a display part 3 bthat displays information regarding a control of the robot apparatus 8.The display part 3 b is configured with a display panel such as a liquidcrystal display panel.

An operation program 41 created in advance for controlling the robotapparatus 8 is input to the robot controller 4. Alternatively, theoperator can perform a teaching operation for setting a teaching pointof the robot 1 by operating the teach pendant 3 so as to drive the robot1. The robot controller 4 can create the operation program 41 for therobot 1 and the welding torch 2 based on the teaching points. The robotapparatus 8 performs the welding based on the operation program 41.

The robot controller 4 includes a storage part 42 for storinginformation related to the control of the robot 1 and the welding torch2. The storage part 42 can be configured of a storage medium capable ofstoring information, for example, a volatile memory, a non-volatilememory, a hard disk, or the like. The operation program 41 is stored inthe storage part 42.

The robot controller 4 includes an operation control unit 43 that sendsan operation command for the robot 1 and the welding torch 2. Theoperation control unit 43 corresponds to a processor that is driven inaccordance with the operation program 41. The operation control unit 43is formed so as to be able to read information stored in the storagepart 42. The processor functions as the operation control unit 43 byreading the operation program 41 and performing the control that isdefined in the operation program 41. Alternatively, the processorfunctions as the operation control unit 43 by driving the robot 1 basedon a command from a first image processing unit 51.

The operation control unit 43 sends an operation command for driving therobot 1 to a robot drive part 45. The robot drive part 45 includes anelectric circuit that drives the robot drive motor 22. The robot drivepart 45 supplies electricity to the robot drive motor 22 based on theoperation command. Further, the operation control unit 43 controls anoperation of the welding torch 2. The operation controller 43 sends anoperation command for driving the welding torch 2 and the wire supplydevice 18 to the welding controller 5 based on the operation program 41.The welding controller 5 supplies electricity to the welding torch 2 andthe wire supply device 18 based on the operation command.

The robot 1 includes a state detector for detecting a position and anorientation of the robot 1. The state detector of the present embodimentincludes a position detector 23 attached to the robot drive motor 22. Byan output of the position detector 23, the direction of the member ofthe robot 1 on each drive axis can be acquired. For example, theposition detector 23 detects a rotation angle when the robot drive motor22 is driven. In the present embodiment, based on outputs from aplurality of the position detectors 23, the position and the orientationof the robot 1 are detected.

The controller 10 of the robot apparatus 8 according to the presentembodiment includes the robot controller 4 that controls the robot 1,and the welding controller 5 that controls the welding torch 2 and thewire supply device 18, but the embodiment is not limited to this. Therobot apparatus 8 may be formed such that one controller controls therobot 1, the welding torch 2, and the wire supply device 18. Forexample, the robot controller 4 may have a function of the weldingcontroller 5.

A world coordinate system 71 is set in the robot apparatus 8 of thepresent embodiment. In the example illustrated in FIG. 1 , an origin ofthe world coordinate system 71 is arranged at the base 14 of the robot1. The world coordinate system 71 is also referred to as a referencecoordinate system of the robot 1. The world coordinate system 71 is acoordinate system in which a position of the origin is fixed, andfurther, directions of coordinate axes are fixed. Even when the positionand the orientation of the robot 1 change, a position and a direction ofthe world coordinate system 71 do not change. The world coordinatesystem 71 has an X-axis, a Y-axis, and a Z-axis which are orthogonal toeach other as coordinate axes. Additionally, a W-axis is set as acoordinate axis around the X-axis. A P-axis is set as a coordinate axisaround the Y-axis. An R-axis is set as a coordinate axis around theZ-axis.

In the present embodiment, a tool coordinate system that has an originwhich is set at any position of the operation tool is set. An origin ofa tool coordinate system 72 according to the present embodiment is setat a tool center point. The tool coordinate system 72 has an X-axis, aY-axis, and a Z-axis which are orthogonal to each other as coordinateaxes. In the example illustrated in FIG. 1 , the tool coordinate system72 has an origin set at a tip point of the wire 19. In addition, thetool coordinate system 72 is set such that an extending direction of theZ-axis is parallel to a direction in which the wire 19 that protrudesfrom a tip of the welding torch 2 extends. The tool coordinate system 72has a W-axis around the X-axis, a P-axis around the Y-axis, and anR-axis around the Z-axis.

When the position and the orientation of the robot 1 change, a positionof the origin and a direction of the tool coordinate system 72 change.For example, the position of the robot 1 corresponds to a position ofthe tool center point (the position of the origin of the tool coordinatesystem 72). Furthermore, the orientation of the robot 1 corresponds tothe direction of the tool coordinate system 72 with respect to the worldcoordinate system 71.

The robot controller 4 includes a first camera 27 as a vision sensor forcapturing an image of a part in which the robot apparatus 8 performs atask. The first cameras 27 of the present embodiment is athree-dimensional camera. As the three-dimensional camera, for example,a time of flight (TOF) camera that captures a distance image by a timeof flight scheme can be employed. The first camera is not limited to athree-dimensional camera and may be a two-dimensional camera.

The first camera 27 is supported by the robot 1. The first camera 27 ofthe present embodiment is fixed to a main body portion of the weldingtorch 2 and moves together with the welding torch 2. The robotcontroller 4 includes the first image processing unit 51 that processesan image by the first camera 27. The first image processing unit 51includes an operation position detecting unit 52 that detects a positionat which the welding torch 2 performs a task based on the image capturedby the first camera 27. The first image processing unit 51 includes acorrection amount calculating unit 53 that calculates a correctionamount of the position of the robot 1 with respect to a movement pointin the first movement path, based on the operation position detected bythe operation position detecting unit 52. The first image processingunit 51 includes a command generation unit 54 that sends a command fordriving the robot in the second movement path where the first movementpath is corrected based on the correction amount calculated by thecorrection amount calculating unit 53.

Each unit of the first image processing unit 51, the operation positiondetecting unit 52, the correction amount calculating unit 53, and thecommand generation unit 54 corresponds to a processor that is driven inaccordance with the operation program 41. The processor functions aseach unit by reading the operation program 41 and performing the controlthat is defined by the operation program 41.

The robot controller 4 includes an inspection device that inspects thequality of the part in which the robot apparatus 8 has performed thetask. In the present embodiment, a shape of a bead generated by arcwelding and a shape of the workpiece around the bead are inspected. Therobot apparatus 8 is provided with a shape detecting sensor fordetecting a shape of the part after the robot apparatus 8 performs thetask. In the present embodiment, a second camera 28 which is a visionsensor is disposed as the shape detecting sensor. The second camera 28of the present embodiment is a three-dimensional camera. The secondcamera 28 is supported by the robot 1. In the present embodiment, thesecond camera 28 is fixed to the main body portion of the welding torch2 and moves together with the welding torch 2.

Note that the vision sensor as the shape detecting sensor is not limitedto the three-dimensional camera, and a two-dimensional camera may beemployed. Further, the shape detecting sensor can employ any sensorcapable of detecting the shape of the part after the robot apparatus 8performs the task. For example, a contact sensor or the like that candetect a shape of the workpiece by contacting the workpiece can beemployed as the shape detecting sensor.

The robot controller 4 includes a second image processing unit 57 thatprocesses an image captured by the second camera 28. The second imageprocessing unit 57 includes an inspection portion detecting unit 58 thatdetects a portion on which an inspection is performed based on the imagecaptured by the second camera 28. The second image processing unit 57includes a variable calculating unit 59 that calculates a qualityvariable representing the quality of the workpiece based on the shapedetected by the output of the second camera 28. In the presentembodiment, as will be described below, a bead width of welding, anundercut depth, and the like correspond to the quality of the workpiece.

The second image processing unit 57 includes a determination unit 60that determines a modification method of a position or an orientation ofthe robot based on a correlation between a correction amount of aposition in the first movement path and a quality variable. Adetermination result by the determination unit 60 is displayed on thedisplay part 3 b of the teach pendant 3.

Each unit of the second image processing unit 57, the inspection portiondetecting unit 58, the variable calculating unit 59, and thedetermination unit 60 corresponds to a processor that is driven inaccordance with the operation program 41. The processor functions aseach unit by reading the operation program 41 and performing the controlthat is defined by the operation program 41.

FIG. 4 illustrates an enlarged perspective view of workpieces and thewelding torch when welding is performed by the first robot apparatusaccording to the present embodiment. In the present embodiment, aworkpiece 81 is fixed on a top face of a platform 89. A workpiece 82 isdisposed on a top face 81 a of the workpiece 81. The workpieces 81 and82 illustrated in FIG. 4 are plate-like members. The workpieces 81 and82 are fixed on the platform 89 by a jig which is not shown in thefigures. The robot apparatus 8 fixes an end face 82 a of the workpiece82 to the top face 81 a of the workpiece 81 by welding. As illustratedby an arrow 91, the robot controller 4 changes the position and theorientation of the robot 1 such that the welding torch 2 moves along theend face 82 a. In the present embodiment, the welding is performed whilethe position of the robot 1 is corrected based on an image captured bythe first camera 27.

FIG. 5 illustrates a movement path before correction and the movementpath after correction of the position of the robot. The movement pathcorresponds to, for example, a path through which the tool center pointpasses. With reference to FIG. 4 and FIG. 5 , a teaching point TP1 atwhich welding is started and a teaching point TP2 at which the weldingis ended are set in the operation program 41. The movement path beforecorrection of the position of the robot 1 is a first movement path 77.The first movement path 77 is a movement path based on the operationprogram 41. The first movement path 77 extends from the teaching pointTP1 toward the teaching point TP2. The first movement path 77 iscorrected based on the image captured by the first camera 27 and asecond movement path 78 is generated as the movement path aftercorrection.

FIG. 6 illustrates a flowchart of a control when welding is performed bythe first robot apparatus. With reference to FIG. 3 to FIG. 6 , when therobot apparatus 8 starts the control for performing welding, in step111, the operation control unit 43 acquires the teaching points TP1 andTP2 from the operation program 41. The operation control unit 43 sets aplurality of interpolation points between the teaching point TP1 and theteaching point TP2. The interpolation points are set along the firstmovement path 77. The interpolation points can be set for eachpredetermined distance, for example. In the example illustrated in FIG.5 , interpolation points IP1, IP2, IP3, and IP4 are illustrated amongmany interpolation points set between the teaching point TP1 and theteaching point TP2. Note that, in the present embodiment, the teachingpoint and the interpolation point are collectively referred to as a“movement point”. In FIG. 5 , movement points MP1 to MP6 beforecorrection are illustrated in the first movement path 77. For example,the movement point MP1 corresponds to the teaching point TP1, and themovement point MP3 corresponds to the interpolation point IP1.

In step 112, the first camera 27 captures an image of a part wherewelding is performed. In the present embodiment, the first camera 27captures an image including the end face 82 a of the workpiece 82 andthe top face 81 a of the workpiece 81. The first image processing unit51 acquires the image by the first camera 27.

In step 113, the operation position detecting unit 52 of the first imageprocessing unit 51 detects a position at which welding of the workpieces81 and 82 is performed. The operation position detecting unit 52 detectsa line on which the end face 82 a of the workpiece 82 and the top face81 a of the workpiece 81 contact with each other in the image capturedby the first camera 27. For example, reference images of the workpieces81 and 82 can be generated in advance. By using the reference image andthe actually captured image, the operation position detecting unit 52can detect the line on which the end face 82 a of the workpiece 82 andthe top face 81 a of the workpiece 81 contact with each other by atemplate matching method.

Since the first camera 27 of the present embodiment is athree-dimensional camera, a distance from the first camera to a portionincluded in the image is detected. The first camera 27 is calibrated sothat the actual position can be detected based on a position in a screencoordinate system in the image and the distance from the first camera27. The operation position detecting unit 52 can detect athree-dimensional position of the line on which the end face 82 a of theworkpiece 82 and the top face 81 a of the workpiece 81 contact with eachother. In other words, the operation position detecting unit 52 candetect a three-dimensional position of the part where welding is to beperformed. In the present embodiment, the tool center point is disposednear the line where the top face 81 a of the workpiece 81 and the endface 82 a of the workpiece 82 contact with each other.

Next, in step 114, the correction amount calculating unit 53 calculatescorrection amounts of positions of the movement points MP1 to MP6 basedon the position of the robot 1 at each of the movement points and theposition of the part where the welding is to be performed. In theexample illustrated in FIG. 5 , correction amounts D1 to D4 arecalculated based on the images captured by the first camera 27 for therespective movement points MP3 to MP6 (interpolation points IP1 to IP4).Note that the correction amounts of the positions at the movement pointMP1 (the teaching point TP1) at which the welding is to be started andthe movement point MP2 (the teaching point TP2) at which the welding isto be ended are zero. A movement point MPC1 after correction is at thesame position as the movement point MP1 before correction. In addition,a movement point MPC2 after correction is at the same position as themovement point MP2 before correction.

In step 115, the correction amount calculating unit 53 calculatespositions of interpolation points IPC1 to IPC4 after correction(movement points MPC3 to MPC6 after correction) based on the correctionamounts D1 to D4. A movement path based on the movement points MPC1 toMPC6 after correction corresponds to the second movement path 78 aftercorrection.

In step 116, the correction amount calculating unit 53 calculates adistance L from a predetermined reference point at each of the movementpoints MPC2 to MPC6 after correction. In the present embodiment, thecorrection amount calculating unit 53 calculates the distance L from themovement point MPC1 which is a starting point of a task. The correctionamount calculating unit 53 calculates the distance L along the secondmovement path 78. In the example illustrated in FIG. 5 , a distance L1from the movement point MPC1 to the movement point MPC3 after correctionis illustrated. Similarly, distances L2, L3, L4, and L5 from themovement point MPC1 are respectively calculated for the movement pointsMPC4, MPC5, and MPC6, and the movement point MPC2 after correction.

In step 117, the storage part 42 stores the correction amounts D1 to D4of the position of the robot 1 and the distances L1 to L5 from thereference point. The storage part 42 stores, for each of the movementpoints MPC1 to MPC6 after correction, the correction amount D of theposition and the distance L from the reference point in combination. Inother words, the storage part 42 stores the correction amount D as afunction of the distance L.

Next, in step 118, the command generation unit 54 sends a command forchanging the position of the robot 1 based on the positions of themovement points MPC1 to MPC6 after correction. The command generationunit 54 generates an operation command for the robot 1 so that the toolcenter point moves along the second movement path 78 after correction.The operation control unit 43 drives the robot 1 in the second movementpath 78 where the first movement path 77 is corrected based on thecorrection amounts calculated by the correction amount calculating unit53. The operation control unit 43 performs the welding while driving therobot 1.

In this case, the welding can be performed without changing theorientation of the robot 1. The orientation of the robot 1 at themovement points MP1 to MP6 before correction can be adopted as theorientation of the robot 1 at the respective movement points MPC1 toMPC6 after correction. For example, the orientation of the robot 1 atthe movement point MP3 can be adopted as the orientation of the robot 1at the movement point MPC3.

In this way, the robot controller 4 calculates a shift of the movementpath with respect to the actual position at which the workpiece is to beprocessed by processing the image captured by the first camera 27. Therobot controller 4 performs the welding while modifying the position ofthe robot 1 based on the shift of the movement path.

FIG. 7 illustrates a flowchart of a control for acquiring parameters ofan inspection that is performed together with the welding. Withreference to FIG. 3 , FIG. 4 , and FIG. 7 , in step 121, an image of abead 80, and the workpieces 81 and 82 after the welding is performed iscaptured by the second camera 28. The second camera 28 captures an imageof a part after the robot apparatus 8 performs a task. The inspectionportion detecting unit 58 of the second image processing unit 57 detectsa portion where an inspection is to be performed in the image capturedby the second camera 28. For example, the inspection portion detectingunit 58 detects the inspection portion in the image based on a referenceimage created in advance of the inspection portion. In the presentexample, the inspection portion detecting unit 58 detects the bead 80and a region around the bead 80.

In step 122, the inspection portion detecting unit 58 detects parametersof shapes of the bead 80 and the workpieces 81 and 82 at the movementpoints MPC1 to MPC6 after correction. Here, the parameters of the shapesof the bead 80 and the workpieces 81 and 82 for evaluating the qualityof the workpieces 81 and 82 after the welding is performed will bedescribed.

FIG. 8 illustrates an enlarged cross-sectional view of the workpiecesand the bead after the welding is performed. The parameters related tothe quality of the workpieces 81 and 82 after the welding is performedare illustrated in FIG. 8 . The second camera 28 of the presentembodiment is a three-dimensional camera. Accordingly, variousdimensions related to the part where the welding is performed can bedetected.

A thickness tw1 of the workpiece 81 and a thickness tw2 of the workpiece82 are measured in advance. A height hb of the bead is included in theparameters for determining the quality of the welding. The height hb ofthe bead can be calculated by a difference between a position of thehighest point on a surface of the bead 80 and a position of a point onthe top face 81 a of the workpiece 81. Excess weld metal he is includedin the parameters for determining the quality. The excess weld metal hecan be calculated by subtracting the thickness tw2 of the workpiece 82from the height hb of the bead. The excess weld metal is preferablyapproximately 10% of the thickness tw2 of the second workpiece 82, forexample. Further, a width wb of the bead is included in the parametersfor evaluating the quality. The width wb of the bead is preferably aboutthe same as the thickness tw2 of the workpiece 82. Also, an angle abrelated to the bead 80 is preferably approximately 45°.

When arc welding is performed, an undercut 81 b may be formed in theworkpiece 81. A depth du of the undercut 81 b can be calculated by adifference between a position of the deepest point of the undercut 81 band a position of a point on the top face 81 a of the workpiece 81. Thedepth du of the undercut 81 b is preferably small. In other words, thedepth du of the undercut 81 b is preferably zero.

FIG. 9 illustrates an enlarged cross-sectional view of other workpiecesand a bead after welding is performed. FIG. 9 illustrates across-sectional view in a case in which workpieces 83 and 84 having aplate-like shape are thick and fillet welding is performed. When thefillet welding is performed, an undercut 83 a may be formed in theworkpiece 83, and an undercut 84 a may be formed in the workpiece 84. Insuch a case, the height hb of the bead, the width wb of the bead 80,depths du1 and du2 of the undercuts 83 a and 84 a, the angle ab of thebead, and the like can be detected.

With reference to FIG. 7 , in step 122, the inspection portion detectingunit 58 detects the parameters of the shapes related to the quality ofthe workpieces as illustrated in FIG. 8 and FIG. 9 . In step 123, thestorage part 42 stores the parameters of the shapes at the movementpoints MPC1 to MPC6 after correction.

FIG. 10 illustrates an example of a graph of the parameters detected bythe inspection portion detecting unit. FIG. 10 illustrates an imagedisplayed on the display part 3 b of the teach pendant 3. As parametersfor inspecting the quality, the height of the bead, the width of thebead, the depth of the undercut, and the excess weld metal areillustrated. Magnitudes of the parameters with respect to the distance Lfrom the movement point MPC1 as the reference point are illustrated. Therobot controller 4 changes the position and the orientation of the robot1 so that the parameters at all movement points MPC1 to MPC6 can bemeasured. In this way, the inspection portion detecting unit 58 candetect the magnitudes of the parameters at each of the movement pointsMPC1 to MPC6.

(First Control for Determining Modification Method of Position orOrientation of Robot)

FIG. 11 is a flowchart of a first control for determining a modificationmethod of the position or the orientation of the robot. With referenceto FIG. 3 , FIG. 5 , and FIG. 11 , the variable calculating unit 59 ofthe second image processing unit 57 calculates a quality variablerepresenting the quality of the workpieces after the welding isperformed based on the parameters of the shapes detected from the imagecaptured by the second camera 28.

In step 131, the variable calculating unit 59 acquires the parameters ofthe shapes at the movement points MPC1 to MPC6 after correction. In step132, the variable calculating unit 59 calculates a score ΔS as thequality variable representing the quality of the workpieces 81 and 82 ateach of the movement points MPC1 to MPC6.

In the present embodiment, the score ΔS for simultaneously evaluating aplurality of parameters is calculated. For example, when the thinworkpieces 81 and 82 are welded as illustrated in FIG. 8 , a variable Scan be calculated as will be represented in Equation (1) below.

$\begin{matrix}{S = {{C\frac{\left( {{tw1} - {du}} \right)}{tw1}} + {\left( {1 - C} \right)\frac{hb}{{tw}2}}}} & (1)\end{matrix}$

Here, a coefficient C is a weight that the operator sets according toimportance. A value larger than 0 and smaller than 1 may be employed asthe coefficient C. In Equation (1), evaluation is performed on theheight hb of the bead and the depth du of the undercut. The height hb ofthe bead is preferably close to the thickness tw2 of the secondworkpiece 82. Alternatively, the depth du of the undercut is preferablyzero. As a result, it can be determined that the closer to 100% thevariable S is, the better the quality of the workpieces after thewelding is performed is.

In addition, as illustrated in FIG. 9 , in a case where the filletwelding is performed on the thick workpieces 83 and 84, the variable Scan be calculated as will be represented in Equation (2) below.

$\begin{matrix}{S = {{\frac{1}{2}\frac{hb}{tw2}} + {\frac{1}{2}\frac{wb}{tw1}}}} & (2)\end{matrix}$

In Equation (2), evaluation is performed on the height hb of the beadand the width wb of the bead. When the workpieces 83 and 84 are thick,the depths du1 and du2 of the undercuts are not problematic, andtherefore, the variable S for evaluating the height hb of the bead andthe width wb of the bead can be adopted. Similarly to Equation (1), thecloser to 100% the variable S is, the better the quality of theworkpieces after the welding is performed is.

Next, in the present embodiment, the score ΔS can be calculated as willbe represented in Equation (3) below, based on the variable S.ΔS=|100−S|  (3)

The score ΔS indicates the quality of the workpieces. It can bedetermined that the smaller the score ΔS is, the better the quality ofthe workpieces is. The score ΔS can be calculated for each of themovement points MPC1 to MPC6 after correction. Also, the score ΔS can becalculated as a function of the distance L.

Note that the score ΔS as the quality variable is not limited to theabove-described embodiment, and any parameter of the shapes can be set.Also, as the quality variable, one parameter of the shapes thatrepresents the quality of welding may be chosen. For example, regardingthe width of the bead, a reference value that is the best width of thebead can be set. Then, the quality variable may be calculated based on adifference between the actually measured width of the bead and thereference value.

Next, the determination unit 60 of the second image processing unit 57determines the modification method of the position or the orientation ofthe robot 1 based on the correlation between each of the correctionamounts D1 to D4 of the positions in the first movement path 77 and thescore ΔS.

In step 133, the determination unit 60 determines whether or not thereis the movement point where the quality variable deviates from apredetermined determination range. The determination unit 60 determineswhether there is the movement point where the quality of the workpieces81 and 82 is bad. In the present embodiment, the determination unit 60determines whether or not there is the movement point where the score ΔSexceeds a predetermined determination value, among the movement pointsMPC1 to MPC6. The determination value of the score ΔS can bepredetermined.

In step 133, when the scores ΔS are lower than or equal to thedetermination value for all movement points MPC1 to MPC6, the control isended. In other words, in a case where there is no movement point wherethe quality of the workpieces 81 and 82 is bad, this control is ended.In step 133, when there is the movement point where the score ΔS exceedsthe determination value, among the movement points MPC1 to MPC6, thecontrol proceeds to step 134.

The determination unit 60 extracts the best movement point that is themovement point at which the quality variable is the best in the secondmovement path 78 and the worst movement point that is the movement pointat which the quality variable is the worst. In step 134, thedetermination unit 60 detects a movement point MPCbest at which thescore ΔS is the best among a plurality of movement points MPC1 to MPC6.In the present embodiment, the determination unit 60 detects themovement point at which the score ΔS is the smallest. Additionally, thedetermination unit 60 detects a correction amount Dbest at the movementpoint MPCbest at which the score ΔS is the best.

In step 135, the determination unit 60 detects a movement point MPCworstat which the score ΔS is the worst among the plurality of movementpoints MPC1 to MPC6. In the present embodiment, the determination unit60 detects the movement point at which the score ΔS is the largest.Additionally, the determination unit 60 detects a correction amountDworst at the movement point MPCworst at which the score ΔS is theworst.

In step 136, the determination unit 60 compares a magnitude of thecorrection amount Dbest to a magnitude of the correction amount Dworst.In the first control of the present embodiment, in a case where thecorrection amount of the position that greatly affects the score ΔS issmall, the correction of the position is determined to be the main causeof deterioration of the score. In this case, it can be determined thatthe modification of the position in the second movement path isrequired. On the other hand, even though the correction of the positionis performed, in a case where the score ΔS is excellent, the influenceof the position of the robot is determined to be small. In this case, itcan be determined that the orientation of the robot in the secondmovement path needs to be modified.

In step 136, when the correction amount Dbest is smaller than thecorrection amount Dworst, the control proceeds to step 137. In step 137,the determination unit 60 adds the movement point MPCworst to theteaching points. In a case where the movement point MPCworst has alreadybeen the teaching point, the control proceeds to step 138.

In step 138, the determination unit 60 sends, to the teach pendant 3, acommand for performing display so as to modify the position at themovement point MPCworst. The display part 3 b of the teach pendant 3performs display so as to modify the position at the movement pointMPCworst as the newly added teaching point. In other words, the displaypart 3 b displays a screen for proposing the modification of theposition of the robot 1.

On the other hand, in step 136, when the correction amount Dbest isequal to or larger than the correction amount Dworst, the controlproceeds to step 139. In step 139, the determination unit 60 adds themovement point MPCbest to the teaching points. In a case where themovement point MPCbest has already been the teaching point, the controlproceeds to step 140.

In step 140, the determination unit 60 sends, to the teach pendant 3, acommand for performing display so as to modify the orientation at themovement point MPCbest. The display part 3 b of the teach pendant 3performs display so as to modify the orientation at the movement pointMPCbest as the newly added teaching point. In other words, the displaypart 3 b displays a screen for proposing the modification of theorientation of the robot 1. The operator can view the screen of thedisplay part 3 b and consider the modification of the position or theorientation of the robot 1.

FIG. 12 illustrates the movement path when the position of the robot atthe teaching point added by the determination unit is modified. In theexample here, as the movement point at which the position is to bemodified, the movement point MPC3 after correction is set as theteaching point TP3. The position of the teaching point TP3 is thenmodified by the operator. The robot apparatus 8 sets the movement paththrough the teaching points TP1, TP2, and TP3 as a first movement path79 when the next workpieces 81 and 82 are welded. The operation control43 then sets interpolation points in a section between the teachingpoint TP1 and the teaching point TP3, and a section between the teachingpoint TP3 and the teaching point TP2. The correction amount calculatingunit 53 calculates the correction amount of the position of the robot 1based on an image captured by the first camera 27 and the first movementpath 79, and sets the second movement path. In this way, the samecontrol as that described above can be repeated.

In the first control of the present embodiment, when the correctionamount at the best movement point that has the best score is smallerthan the correction amount at the worst movement point that has theworst score, it is determined that the position of the robot needs to bemodified. On the other hand, when the correction amount at the bestmovement point that has the best score is larger than the correctionamount at the worst movement point that has the worst score, thedetermination unit determines that the orientation of the robot needs tobe modified. Then, the display part can display a screen for proposingthe modification of the position or the orientation of the robot.

In the control of the present embodiment, the modification method of theteaching point is determined based on a correlation between thecorrection amount of the position in the movement path and the qualityvariable. Accordingly, the position or the orientation of the robot canbe appropriately modified regardless of the experience or skill of theoperator. In addition, the teaching points can be modified in a shortperiod of time, as compared to a case where the position or theorientation of the robot is modified based on the experience of theoperator.

The modification of the teaching point in the present embodiment can beperformed by stopping a task being performed by the robot apparatusduring a period of time when a product is being manufactured. Forexample, when the screen proposing the modification of the position orthe orientation of the robot is displayed, the movement point of thepresent embodiment can be modified. Alternatively, in a case where thelot of the workpiece changes, the movement point in the presentembodiment may be modified.

In the first robot apparatus 8 according to the present embodiment, thefirst movement path 77 of the robot 1 is corrected based on the imagecaptured by the first camera 27, but the embodiment is not limited tothis. Any sensor can be used in order to correct the first movement pathof the robot. Alternatively, the first movement path of the robot can becorrected without using a sensor.

FIG. 13 illustrates an enlarged partial cross-sectional view ofworkpieces and the welding torch for describing the control forcorrecting the first movement path of the robot. FIG. 13 illustrates astate before welding is performed. The top face 81 a of the workpiece 81is disposed so as to extend in a horizontal direction. In addition, theend face 82 a of the workpiece 82 is disposed so as to extend in avertical direction. The operation control unit 43 controls the positionand the orientation of the robot 1 such that the wire 19 protruding fromthe welding torch 2 is disposed in a vicinity of a part where thewelding is performed. The welding controller 5 applies a small voltageto the wire 19.

The operation control unit 43 changes the position and the orientationof the robot 1 so that the welding torch 2 moves in a directionindicated by an arrow 93. When the wire 19 contacts the top face 81 a ofthe workpiece 81, a small current flows. A position of a tip of the wire19 at this time (a position of the tool center point) corresponds to aposition of the top face 81 a of the workpiece 81. The robot controller4 can detect the position of the top face 81 a of the workpiece 81.

Next, the operation control unit 43 returns the welding torch 2 to theoriginal position. The welding controller 5 applies a small voltage tothe wire 19. The operation control unit 43 changes the position and theorientation of the robot 1 so that the wire 19 is directed toward theend face 82 a of the workpiece 82, as indicated by an arrow 94. When thewire 19 contacts the end face 82 a of the workpiece 82, a small currentflows. The position of the tip of the wire 19 at this time correspondsto a position of the end face 82 a of the workpiece 82. The robotcontroller 4 can detect the position of the end face 82 a of theworkpiece 82.

Based on the position of the top face 81 a of the workpiece 81 and theposition of the end face 82 a of the workpiece 82, the robot controller4 can detect a position of a point CP where the workpiece 82 contactsthe workpiece 81. Then, by correcting the first movement path based onthe position of the point CP, the second movement path can be generated.The same value can be applied to the correction amount of the movementpath from the starting point of the welding to the ending point of thewelding. One correction amount can be applied to the entire movementpath. In this way, the robot controller 4 can detect the position atwhich the robot apparatus performs the task without using a visionsensor.

FIG. 14 illustrates an enlarged partial cross-sectional view ofworkpieces and the welding torch for describing another control forcorrecting the first movement path of the robot. In the exampleillustrated in FIG. 14 , a workpiece 85 having a cutout 85 a and aworkpiece 86 having a cutout 86 a are to be fixed by welding. The cutout85 a and the cutout 86 a form a recess whose cross-sectional shape is aV-shape. The welding torch 2 moves along a direction in which the recessextends. A bead is formed inside the recess.

In addition, the welding torch 2 performs welding while moving back andforth as indicated by an arrow 92 inside the recess. In other words, therobot apparatus performs welding while performing weaving. The weavingis a method of performing welding while vibrating the welding torch, forexample, in a direction perpendicular to a direction in which a partwhere the welding is performed extends. The weaving is suitable when anamount of bead is large.

FIG. 15 illustrates a graph of a current flowing through the wire whenwelding is performed while weaving is performed. With reference to FIG.14 and FIG. 15 , the welding controller 5 detects a current flowingthrough the wire 19 during a period of time when the welding isperformed. The welding torch 2 vibrates with a reference point RP set atthe movement point being as a center. In a case where the referencepoint RP is disposed in a center portion of the recess that is formed bythe cutouts 85 a and 86 a, a value of the current oscillates with areference value of the current being as a center. When the referencepoint RP is shifted from the center portion of the recess, the center ofthe current oscillation is shifted from the reference value.

The operation control unit 43 in the present embodiment gradually movesthe first movement path so that the center of the current oscillation isdirected toward the reference value during the period of time when thewelding is performed. That is, the movement path is corrected so thatthe center of the current oscillation is directed toward the referencevalue over time. In this way, by detecting the current flowing throughthe wire during the period of time when the welding is performed, thefirst movement path can be corrected. In this case as well, the robotcontroller 4 stores the second movement path after correction. The robotcontroller 4 can calculate the correction amount of the position of themovement point based on the position of the movement point in the secondmovement path.

(Second Control for Determining Modification of Position or Orientationof Robot)

Next, a second control for determining a modification method of theposition or the orientation of the robot will be described. In thesecond control, determination is made as to whether to modify theposition of the robot 1 or to modify the orientation of the robot 1.

With reference to FIG. 6 , FIG. 7 , and FIG. 11 , the control until thedetermination unit 60 calculates the score ΔS (control up to step 132 inFIG. 11 ) is similar to the first control. Next, the determination unit60 determines whether there is the movement point at which the score ΔSexceeds the predetermined determination value. When there is no movementpoint at which the score ΔS exceeds the determination value, the controlis ended.

In a case where the movement point where the score ΔS exceeds thedetermination value is present, the determination unit 60 calculates acorrelation coefficient between the score ΔS and the correction amountof the position at each of the plurality of movement points MPC1 toMPC6. A correlation coefficient CC can be calculated, for example, byEquation (4) below. Here, a function E(a) represents an average of a. Avariable L indicates a distance from the reference point.

$\begin{matrix}{{CC} = \frac{E\left\lbrack {\left( \left| {D(L)} \middle| {- {E\left\lbrack \left| {D(L)} \right| \right\rbrack}} \right. \right)\left( {{{\Delta S}(L)} - {E\left\lbrack {{\Delta S}(L)} \right\rbrack}} \right)} \right\rbrack}{{E\left\lbrack \left( \left| {D(L)} \middle| {- {E\left\lbrack \left| {D(L)} \right| \right\rbrack}} \right. \right) \right\rbrack}{E\left\lbrack \left( {{{\Delta S}(L)} - {E\left\lbrack {{\Delta S}(L)} \right\rbrack}} \right) \right\rbrack}}} & (4)\end{matrix}$

The determination unit 60 determines whether the correlation coefficientis larger than a predetermined determination value. The determinationvalue of the correlation coefficient can be predetermined by theoperator and be stored in the storage part 42. As the determinationvalue of the correlation coefficient, for example, 0.5 can be employed.

When the correlation coefficient exceeds the determination value, thedetermination unit 60 can determine that there is a correlation betweencorrection of the position of the robot 1 and deterioration of the scoreΔS. The determination unit 60 determines that the position of the robot1 needs to be modified. The display part 3 b of the teach pendant 3displays a screen for proposing modification of the position of therobot 1.

On the other hand, in a case where the correlation coefficient issmaller than or equal to the predetermined determination value, thedetermination unit 60 can determine that there is no correlation betweencorrection of the position of the robot 1 and deterioration of the scoreΔS. The determination unit 60 determines that modification of theorientation of the robot 1 needs to be corrected. The display part 3 bdisplays a screen for proposing modification of the orientation of therobot 1.

Additionally, the determination unit 60 can set the movement point withthe worst score as the teaching point. Additionally, the display part 3b of the teach pendant 3 can display the movement point with the worstscore as a point at which the position or the orientation of the robot 1should be modified.

Thus, in the second control as well, based on the correlation betweenthe correction amount of the position in the movement path and thequality variable, the modification method of the position or theorientation of the robot 1 can be determined.

(Control for Calculating Modification Amount of Orientation)

The robot controller 4 according to the present embodiment is formed sothat the modification amount of the orientation of the robot 1 can becalculated when it is determined that the orientation of the robot 1should be modified. The movement point where the orientation of therobot 1 is to be modified can be selected in any manner. For example,the movement point selected by the determination unit 60 can be adopted.Alternatively, the operator may set a teaching point for modifying theorientation of the robot 1.

FIG. 16 is a diagram illustrating orientations of the welding torch inthe movement path before correction and the movement path aftercorrection in the comparative example. The first movement path 77 of therobot 1 is a path from the movement point MP1 toward the movement pointMP2. In the example here, the movement point MP2 is corrected to themovement point MPC2, as indicated by an arrow 96, based on an image by avision sensor. The second movement path 78 is a path from the movementpoint MPC1 toward the movement point MPC2. At this time, in the worldcoordinate system 71, an orientation of the welding torch 2 at themovement point MPC3 after correction is the same as the orientation ofthe welding torch 2 at the movement point MP3 before correction. Inother words, coordinate values of the W-axis, the P-axis, and the R-axisin the world coordinate system 71 are the same.

By correcting the position of the movement point MP3, a direction inwhich the movement path extends changes. However, since the orientationof the welding torch 2 is not changed, a direction of the welding torch2 with respect to the direction in which the movement path extendschanges. As a result, the direction of the welding torch 2 with respectto a workpiece also changes. In the present example, it is determinedthat the orientation of the welding torch 2 is not preferred at themovement point MPC3.

FIG. 17 illustrates the movement path before correction and the movementpath after correction after the orientation of the welding torch ismodified in the movement path after correction. The determination unit60 according to the present embodiment calculates the direction of thewelding torch 2 at the movement point MPC3 after correction. Thedetermination unit 60 calculates the orientation of the welding torch 2so as to maintain the orientation of the welding torch 2 with respect todirections in which the movement paths 77 and 78 extend. In other words,the determination unit 60 calculates the direction of the welding torch2 such that the direction of the welding torch 2 with respect to thedirection in which the second movement path 78 extends is the same asthe direction of the welding torch 2 with respect to the direction inwhich the first movement path 77 extends.

The determination unit 60 sets an auxiliary coordinate system 73 withthe movement point MP3 in the first movement path 77 being as an origin.The determination unit 60 sets a direction in which the first movementpath 77 extends from the movement point MP3 as the X-axis. Next, thedetermination unit 60 calculates an axis extending from the movementpoint MP3 downward in the vertical direction, and sets an axisorthogonal to the axis and the X-axis as the Y-axis. The determinationunit 60 sets the Z-axis extending in a direction perpendicular to theX-axis and the Y-axis.

The determination unit 60 sets an auxiliary coordinate system 74 withthe movement point MPC3 in the second movement path 78 being as anorigin. The X-axis in the auxiliary coordinate system 74 can be set inan extending direction of the second movement path 78. Then, thedetermination unit 60 sets the Y-axis and the Z-axis in the auxiliarycoordinate system 74 by the same method as the auxiliary coordinatesystem 73.

The determination unit 60 calculates the direction of the welding torch2 disposed at the movement point MP3 in the first movement path 77 byusing coordinate values of the W-axis, the P-axis, and the R-axis in theauxiliary coordinate system 73. In other words, the determination unit60 converts the orientation of the robot 1 represented by coordinatevalues in the world coordinate system 71 into coordinate values in theauxiliary coordinate system 73. The coordinate values in the auxiliarycoordinate system 73 correspond to the direction of the welding torch 2with respect to the direction in which the first movement path 77extends.

The determination unit 60 sets the same values as the coordinate valuesin the auxiliary coordinate system 73 as coordinate values in theauxiliary coordinate system 74. The coordinate values of the W-axis, theP-axis, and the R-axis in the auxiliary coordinate system 74 are set.The coordinate values in the auxiliary coordinate system 74 at this timecorrespond to the direction of the welding torch 2 with respect to thedirection in which the second movement path 78 extends, and correspondto the direction of the welding torch 2 after the orientation ismodified. The determination unit 60 can calculate the orientation of therobot 1 after modification by converting the coordinate values in theauxiliary coordinate system 74 into coordinate values in the worldcoordinate system 71 of the robot 1.

The determination unit 60 calculates a difference between theorientation of the robot 1 before modification and the orientation ofthe robot 1 after modification. The display part 3 b can display thedifference between the orientations of the robot 1. This differencebetween the orientations corresponds to the modification amount of theorientation of the robot 1 when the operator modifies the orientation.The operator can modify the orientation of the robot 1 in accordancewith the display of the display part 3 b. In this way, the determinationunit 60 can calculate the orientation of the robot 1 in the secondmovement path 78 based on the orientation of the robot 1 in the firstmovement path 77. The display part 3 b of the teach pendant 3 candisplay the modification amount of the orientation of the robot 1calculated by the determination unit 60.

FIG. 18 illustrates a movement path after correction for describinganother control for calculating the modification amount of theorientation of the robot. In the other control for calculating themodification amount of the orientation of the robot, the orientation ofthe robot 1 in the second movement path 78 is referenced. In the examplehere, the orientation of the welding torch 2 is modified at the movementpoint MPC5. The movement point MPC5 is, for example, a movement pointwhere the score ΔS is bad.

The determination unit 60 detects, in the second movement path 78, themovement point MPC4 at which the score ΔS is the best. The determinationunit 60 sets the auxiliary coordinate systems 73 and 74 at therespective movement points MPC4 and MPC5. The auxiliary coordinatesystems 73 and 74 can be set by the above-described control. In otherwords, the auxiliary coordinate systems 73 and 74 are set with adirection in which the second movement path 78 extends being as thedirection of the X-axis at the respective movement points MPC4 and MPC5.

Next, similarly to the above-described control, the determination unit60 calculates coordinate values of the direction of the welding torch 2in the auxiliary coordinate system 73. Then, the determination unit 60sets the same values as the coordinate values of the direction of thewelding torch 2 in the auxiliary coordinate system 73 to coordinatevalues of the direction of the welding torch 2 in the auxiliarycoordinate system 74. Next, the determination unit 60 can calculate theorientation of the robot 1 after modification by converting thecoordinate values of the direction of the welding torch 2 in theauxiliary coordinate system 74 into coordinate values of the worldcoordinate system 71. Then, the determination unit 60 can calculate themodification amount of the orientation of the robot 1 based on adifference between the orientation of the robot 1 before modificationand the orientation of the robot 1 after modification. The display part3 b of the teach pendant 3 can display the modification amount of theorientation of the robot 1 calculated by the determination unit 60.

By adopting this control, the direction of the welding torch withrespect to the movement path at the movement point that is to bemodified can be matched to the direction of the welding torch withrespect to the movement path at the movement point having the bestscore. For this reason, the work quality of the robot apparatus can beexpected to be improved. Note that the controller 10 of the robotapparatus 8 may be formed so as not to calculate the modification amountof the orientation of the robot 1. In this case, the operator candetermine the modification amount of the orientation of the robot 1based on the experience.

(Control for Calculating Modification Amount of Position)

The robot controller 4 according to the present embodiment is formed sothat the modification amount of the position of the robot 1 can becalculated in a case where it is determined that the position of therobot 1 should be modified. Next, the control for calculating themodification amount of the position of the robot 1 will be described.The movement point where the position of the robot 1 is to be modifiedcan be selected in any manner. For example, the movement point selectedby the determination unit 60 can be adopted. Alternatively, the operatormay set a teaching point for modifying the position of the robot 1.

FIG. 19 illustrates a movement path before correction and a movementpath after correction of the robot for describing the modification ofthe position. In the example illustrated in FIG. 19 , the first movementpath 77 is set so as to be directed from the movement point MP1 towardthe movement point MP2 based on the operation program 41. By correctingthe position of the robot 1 in an image captured by the first camera 27,the second movement path 78 is generated from the movement point MPC1toward the movement point MPC2. The robot apparatus 8 performs weldingwhile changing the position along the second movement path 78.

The movement point MPC4 is a movement point at which the position of therobot 1 is to be modified. The movement point MPC4 is, for example, amovement point where the score ΔS is bad. The determination unit 60detects the movement point MPC3 having the best score in the secondmovement path 78. Additionally, the determination unit 60 calculates amovement amount and a movement direction of the position of the movementpoint MP3 as a correction amount of the position indicated by an arrow97. This correction amount can be calculated, for example, by coordinatevalues of the X-axis, the Y-axis, and the Z-axis in the world coordinatesystem 71.

Next, the determination unit 60 sets the auxiliary coordinate systems 73and 74 at the respective movement points MPC3 and MPC4. The auxiliarycoordinate systems 73 and 74 are a coordinate system with the directionin which the second movement path 78 extends being as the X-axis at therespective movement points MPC3 and MPC4. The auxiliary coordinatesystems 73 and 74 can be set by the above-described control.

FIG. 20 illustrates the auxiliary coordinate system at the movementpoint having the best score. The determination unit 60 converts thecorrection amount of the movement point MPC3 represented by the worldcoordinate system 71 into coordinate values in the auxiliary coordinatesystem 73. In other words, a source of the arrow 97 is positioned at anorigin of the auxiliary coordinate system 73. The movement amount andthe movement direction of at the movement point MP3 are calculated byusing coordinate values of the X-axis, the Y-axis, and the Z-axis in theauxiliary coordinate system 73.

FIG. 21 illustrates the auxiliary coordinate system at the movementpoint at which the position is to be modified. The determination unit 60sets the coordinate values of the X-axis, the Y-axis, and the Z-axis ofthe arrow 97 in the auxiliary coordinate system 73 to coordinate valuesof the X-axis, the Y-axis, and the Z-axis in the auxiliary coordinatesystem 74. An arrow 98 is generated when the coordinate values areapplied to the auxiliary coordinate system 74. The arrow 98 correspondsto the modification amount at the movement point MPC4. The determinationunit 60 can calculate the modification amount of the position of therobot 1 by converting the coordinate values of the X-axis, the Y-axis,and the Z-axis in the auxiliary coordinate system 74 into coordinatevalues of the X-axis, the Y-axis, and the Z-axis in the world coordinatesystem 71. The movement point after the movement point MPC4 in thesecond movement path 78 is moved in a direction indicated by the arrow98 becomes the movement point after the position is modified.

The determination unit 60 can calculate the modification amount of theposition by calculating a difference between the coordinate values ofthe position of the movement point MPC4 in the second movement path 78and the coordinate values of the position of the robot 1 aftermodification. The display part 3 b of the teach pendant 3 can displaythe modification amount of the position.

In this manner, in calculation of the modification amount of theposition in the present embodiment, by using the movement amount and themovement direction of the position at the movement point with anexcellent score, the movement amount of the position and the movementdirection of the movement point at which the position is to be modifiedcan be calculated. The movement direction and the movement amount of themovement point with respect to the movement path at the movement pointwhere the score is excellent can be applied to the modification of themovement point at which the position is to be modified. For this reason,the work quality of the robot apparatus 8 can be expected to beimproved.

Note that the controller 10 of the robot apparatus 8 may be formed suchthat the modification amount of the position of the robot 1 is notcalculated. In this case, the operator can determine the modificationamount of the position of the robot 1 based on the experience.

The first robot apparatus 8 described above includes the first camera 27for detecting an operation position, and the second camera 28 forperforming inspection, but the embodiment is not limited to this. Asingle camera may detect the operation position and inspect a workpiece.For example, welding is performed while the operation position isdetected by using the single camera. After this, the inspection of theworkpiece can be performed by changing the setting of the camera andcapturing an image of a welded part.

Further, in the first robot apparatus 8, the welding of the workpieces81 and 82 and the inspection of the quality of the workpieces 81 and 82are performed by one robot 1, but the embodiment is not limited to this.The robot apparatus may include a robot for performing inspection inaddition to a robot for performing welding.

FIG. 22 illustrates a block diagram of a second robot apparatusaccording to the present embodiment. The second robot apparatus 9includes a welding robot 32 for performing a task, and an inspectionrobot 34 for performing inspection. Each of the welding robot 32 and theinspection robot 34 can be configured with an articulated robot.

The welding robot 32 is a robot that moves the welding torch 2 andperforms welding of a workpiece. The welding robot 32 has aconfiguration in which the second camera 28 is not attached in the robot1 of the first robot apparatus 8. The welding torch 2 is secured to awrist of the welding robot 32. The first camera 27 can be attached tothe welding torch 2.

The inspection robot 34 is a robot for moving the second camera 28. Theinspection robot 34 has a configuration in which the first camera 27 andthe welding torch 2 are not attached in the robot 1 of the first robotapparatus 8. The second camera 28 can be attached to a wrist of theinspection robot 34.

A controller 39 of the second robot apparatus 9 includes a welding robotcontroller 31 that controls the welding robot 32, and an inspectionrobot controller 33 that controls the inspection robot 34. The weldingrobot controller 31 includes an arithmetic processing device including aCPU. Similarly to the robot controller 4 of the first robot apparatus 8,the welding robot controller 31 includes the storage part 42, theoperation control unit 43, and the robot drive part 45. Also, thewelding robot controller 31 includes the first image processing unit 51.The welding robot controller 31 includes a teach pendant. An operationprogram 37 is input to the welding robot controller 31.

Furthermore, similarly to the welding robot controller 31, theinspection robot controller 33 includes the storage part 42, theoperation control unit 43, and the robot drive part 45. The inspectionrobot controller 33 includes a teach pendant. An operation program 38 isinput to the inspection robot controller 33.

The controller 39 of the second robot apparatus 9 includes adetermination device 35 for determining an inspection result. Thedetermination device 35 is configured with an arithmetic processingdevice including a CPU. The determination device 35 includes an inputpart 35 a and a display part 35 b. The determination device 35 includesa storage part 35 c configured of a storage medium such as a volatilememory, or a non-volatile memory. The determination device 35 includesthe second image processing unit 57. An image acquired by the secondcamera 28 of the inspection robot controller 33 is processed by thedetermination device 35. The determination device 35 can determine amodification method of a position or an orientation of the robot 1. Adetermination result by the determination device 35 can be displayed onthe display part 35 b. An operator can view the display of the displaypart 35 b and define a modification method of the position or theorientation of the robot 1.

Other configurations, operations, and effects of the second robotapparatus 9 are similar to those of the first robot apparatus 8, andtherefore the description thereof will not be repeated here.

In the present embodiment, the robot apparatus for performing arcwelding is exemplified and described, but the embodiment is not limitedto this. The control according to the present embodiment can be appliedto any robot apparatus that corrects a position or an orientation of arobot. For example, the control according to the present embodiment canbe applied to a robot apparatus that performs laser welding, or a robotapparatus provided with an operation tool that applies an adhesive.

According to an aspect of the present disclosure, it is possible toprovide a controller of a robot apparatus capable of determining amodification method of a position and an orientation of a robot.

The above embodiments can be combined as appropriate. In each of theabove-described drawings, the same or equivalent portions are denoted bythe same reference numerals. It should be noted that the above-describedembodiment is an example and does not limit the invention. In addition,the embodiment includes modifications of the embodiment described in theclaims.

The invention claimed is:
 1. A controller of a robot apparatus providedwith a robot and an operation tool, the controller comprising: acorrection amount calculating unit configured to calculate a correctionamount of a position of the robot at a movement point in a firstmovement path determined in advance; an operation control unitconfigured to drive the robot in a second movement path obtained bycorrecting the first movement path based on the correction amountcalculated by the correction amount calculating unit; a shape detectingsensor configured to detect a shape of a part after the robot apparatusperforms a task; a variable calculating unit configured to calculate aquality variable representing quality of a workpiece based on the shapedetected by an output of the shape detecting sensor; and at least oneprocessor configured to determine a modification method of the positionor an orientation of the robot, and determine that, in a case where thequality variable deviates from a predetermined determination range, theposition or the orientation of the robot needs to be modified based on acorrelation between the correction amount of the position of the firstmovement path and the quality variable, wherein the at least oneprocessor is further configured to extract a plurality of movementpoints, each of which has a quality variable in the second movementpath, and determine that the position or the orientation of the robotneeds to be modified in response to a result of comparing the qualityvariable at each of the plurality of movement points with apredetermined value and comparing the correction amount for one of theplurality of movement points with the correction amount for another ofthe plurality of movement points.
 2. The controller according to claim1, further comprising: a vision sensor configured to capture an image ofa part where the robot apparatus performs the task, wherein the at leastone processor is further configured to detect a position where the taskis to be performed based on the image captured by the vision sensor, andwherein the correction amount calculating unit calculates the correctionamount of the position of the robot based on the position which isdetected by the at least one processor and at which the task is to beperformed, and a position of the movement point in the first movementpath.
 3. The controller according to claim 1, further comprising: adisplay configured to display information related to control of therobot apparatus, wherein the at least one processor is configured toextract a best movement point being the movement point having the bestquality variable and a worst movement point being the movement pointhaving the worst quality variable in the second movement path, the atleast one processor is configured to determine that the position of therobot needs to be modified when the correction amount of the position atthe best movement point is smaller than the correction amount of theposition at the worst movement point, and the display displays a screenconfigured to propose modification of the position of the robot, and theat least one processor is configured to determine that the orientationof the robot needs to be modified when the correction amount of theposition at the best movement point is larger than the correction amountof the position at the worst movement point, and the display displays ascreen configured to propose modification of the orientation of therobot.
 4. The controller according to claim 1, further comprising: adisplay configured to display information related to control of therobot apparatus, wherein the at least one processor is configured tocalculate a correlation coefficient between the correction amount of theposition and the quality variable at each of the plurality of movementpoints, the at least one processor is configured to determine that theposition of the robot needs to be modified when the correlationcoefficient exceeds a predetermined determination value, and the displaydisplays a screen configured to propose modification of the position ofthe robot, and the at least one processor is configured to determinethat the orientation of the robot needs to be modified when thecorrelation coefficient is smaller than the predetermined determinationvalue, and the display displays a screen configured to proposemodification of the orientation of the robot.
 5. A controller of a robotapparatus provided with a robot and an operation tool, the controllercomprising: a correction amount calculating unit configured to calculatea correction amount of a position of the robot at a movement point in afirst movement path determined in advance; an operation control unitconfigured to drive the robot in a second movement path obtained bycorrecting the first movement path based on the correction amountcalculated by the correction amount calculating unit; a shape detectingsensor configured to detect a shape of a part after the robot apparatusperforms a task; a variable calculating unit configured to calculate aquality variable representing quality of a workpiece based on the shapedetected by an output of the shape detecting sensor; at least oneprocessor configured to determine a modification method of the positionor an orientation of the robot, and determine that, in a case where thequality variable deviates from a predetermined determination range, theposition or the orientation of the robot needs to be modified based on acorrelation between the correction amount of the position of the firstmovement path and the quality variable; and a display configured todisplay information related to control of the robot apparatus, whereinthe at least one processor calculates a direction of the operation toolwith respect to an extending direction of the first movement path at themovement point in the first movement path corresponding to the movementpoint where the orientation needs to be modified in the second movementpath, and calculates a modification amount of the orientation of therobot in such a manner that a direction of the operation tool withrespect to an extending direction of the second movement path at themovement point in the second movement path is the same as a direction ofthe operation tool with respect to the extending direction of the firstmovement path, and the display displays the modification amount of theorientation of the robot calculated by the at least one processor.
 6. Acontroller of a robot apparatus provided with a robot and an operationtool, the controller comprising: a correction amount calculating unitconfigured to calculate a correction amount of a position of the robotat a movement point in a first movement path determined in advance; anoperation control unit configured to drive the robot in a secondmovement path obtained by correcting the first movement path based onthe correction amount calculated by the correction amount calculatingunit; a shape detecting sensor configured to detect a shape of a partafter the robot apparatus performs a task; a variable calculating unitconfigured to calculate a quality variable representing quality of aworkpiece based on the shape detected by an output of the shapedetecting sensor; and at least one processor configured to determine amodification method of the position or an orientation of the robot, anddetermine that, in a case where the quality variable deviates from apredetermined determination range, the position or the orientation ofthe robot needs to be modified based on a correlation between thecorrection amount of the position of the first movement path and thequality variable, wherein the at least one processor is furtherconfigured to calculate a correction coefficient between the correctionamount of the position and a quality variable at each of a plurality ofmovement points, and determine that the position or the orientation ofthe robot needs to be modified in response to a result of comparing thecorrelation coefficient with a predetermined determination value.
 7. Thecontroller according to claim 6, further comprising: a vision sensorconfigured to capture an image of a part where the robot apparatusperforms the task, wherein the at least one processor is furtherconfigured to detect a position where the task is to be performed basedon the image captured by the vision sensor, and wherein the correctionamount calculating unit calculates the correction amount of the positionof the robot based on the position which is detected by the at least oneprocessor and at which the task is to be performed, and a position ofthe movement point in the first movement path.
 8. The controlleraccording to claim 6, further comprising: a display configured todisplay information related to control of the robot apparatus, whereinthe at least one processor is configured to extract a best movementpoint being the movement point having the best quality variable, and aworst movement point being the movement point having the worst qualityvariable in the second movement path, the at least one processor isconfigured to determine that the position of the robot needs to bemodified when the correction amount of the position at the best movementpoint is smaller than the correction amount of the position at the worstmovement point, and the display displays a screen configured to proposemodification of the position of the robot, and the at least oneprocessor is configured to determine that the orientation of the robotneeds to be modified when the correction amount of the position at thebest movement point is larger than the correction amount of the positionat the worst movement point, and the display displays a screenconfigured to propose modification of the orientation of the robot. 9.The controller according to claim 6, further comprising: a displayconfigured to display information related to control of the robotapparatus, wherein the at least one processor is configured to determinethat the position of the robot needs to be modified when the correlationcoefficient exceeds the predetermined determination value, and thedisplay displays a screen configured to propose modification of theposition of the robot, and the at least one processor is configured todetermine that the orientation of the robot needs to be modified whenthe correlation coefficient is smaller than the predetermineddetermination value, and the display displays a screen configured topropose modification of the orientation of the robot.